package com.xiaou.buss.admin.role.service.impl;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.base.service.BaseServiceImpl;
import com.xiaou.buss.admin.role.dao.RoleDao;
import com.xiaou.buss.admin.role.service.RoleService;
import com.xiaou.buss.admin.userrole.dao.UserRoleDao;

/**
 * 
 * <br>
 * <b>功能：</b>RoleService<br>
 */
@Service
public class  RoleServiceImpl  extends BaseServiceImpl implements RoleService {
  Logger logger = LoggerFactory.getLogger(getClass());
	

	@Autowired
    private RoleDao dao;

	@Autowired
	private UserRoleDao userRoleDao;
		
	public RoleDao getDao() {
		return dao;
	}

	@Override
	@Transactional
	public void deleteByroleId(String roleId){
		dao.delete(roleId);
		userRoleDao.deleteByRoleId(roleId);
	}
}
